package com.chen.web;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

//
//@WebServlet("/s1") // webServlet的作用代替了web.xml文件配置 url 和 实现servlet类 之间的映射关系
public class Servlet01 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("service方法执行了");
        resp.getWriter().write("OK");
    }
}
